import React from 'react'
import PropTypes from 'prop-types';
function My_content({dataChildren}) {
    return (
        <div>
            {
                dataChildren&&dataChildren.map((val,i)=>{
                  return <div key={i}>
                    <p>{val.title}</p>
                    <img src={val.img} alt="图片加载失败"/>
                  </div>
                })
            }
        </div>
    )
}
My_content.defaultProps={
    dataChildren:[
        {
            title:"没有数据了"
        }
    ]
}

My_content.propTypes = {
    dataChildren: PropTypes.array.isRequired
};
export default My_content
